﻿using BlondeHeaven.DB.Model;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace BlondeHeaven.DAL.Interface
{
    public interface IDalShopKeeperService<T> where T : class, new()
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        T Add(T model);
        /// <summary>
        /// 查询所有
        /// </summary>
        /// <returns></returns>
        IQueryable<T> GetAll();
        /// <summary>
        /// 查询所有商店
        /// </summary>
        /// <returns></returns>
        List<ShopKeeper> GetAllShop();

        /// <summary>
        /// 查询一个商店
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        T GetOneById(int Id);

        List<ShopKeeper> GetOneByName(string Name);
        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="model"></param>
        /// <param name="saved"></param>
        /// <returns></returns>
        T EditAsync(T model);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="saved"></param>
        /// <returns></returns>
        T RemoveAsync(T model);
        int SaveChanges();
    }
}
